#pragma once

#include <d3dx9.h>
#include <d3d9.h>

bool CheckShaderModel20(LPDIRECT3DDEVICE9 d3ddev)
{
	bool b = true;

	D3DCAPS9 caps;
	d3ddev->GetDeviceCaps(&caps);

	//Check For Shader Model 2.0 support
	if( caps.VertexShaderVersion < D3DVS_VERSION(2, 0) )
		b = false;

	if( caps.PixelShaderVersion < D3DVS_VERSION(2, 0) )
		b = false;

	return b;
}

bool CheckShaderModel30(LPDIRECT3DDEVICE9 d3ddev)
{
	bool b = true;

	D3DCAPS9 caps;
	d3ddev->GetDeviceCaps(&caps);

	//Check For Shader Model 3.0 support
	if( caps.VertexShaderVersion < D3DVS_VERSION(3, 0) )
		b = false;

	//_cprintf("%i\n", b);

	if( caps.PixelShaderVersion < D3DVS_VERSION(3, 0) )
		b = false;

	//_cprintf("%i\n", b);

	return b;
}